<?php
	include_once 'isLogin.php';	
	$groupc=new group();

	if($_GET['action']=='pwd'){
		$id=$_GET['id'];
		$res = $commonc->update('admin', array('pwd' =>md5('123456'),),'id='.$id);
		echo $commonc->submitAlert("操作成功","admin_list.php");
		exit;
	}


	if($_GET['action']=="del"){
		echo $commonc->del("admin", $_POST['id']);
		exit();
	}


	
	if($_POST){
		$where=" AND a.name like '%".$_POST['title']."%'";
		$smarty->assign('search',$_POST);
	}
	$admin=$groupc->admin_list($where);

	
	$smarty->assign("admin",$admin['result']);
	$smarty->assign('pages',$admin['page']);
	$smarty->display("admin_list.html");
?>